{% comment %}
<!--
  Copyright (C) 2008 ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
  - http://heavyz.blogspot.com/
  - http://buggarden.blogspot.com/

  The restaurant's best dishes section.
  
  Created on 2008-11-07.
  $Id: resto_best_dishes.html 270 2008-11-07 19:13:13Z heavyzheng $
-->
{% endcomment %}

<div id="resto_best_dishes" class="section">

  {% if error %}
    <div class="error message">
      {{ error }}
      <a href="javascript:void(0);" onclick="closeMessage('#resto_best_dishes')">[close]</a>
    </div>
  {% endif %}

  <div class="form-toggle">
    <p>
      Best dishes:
      {% if resto.best_dishes %}
        {% for dish in resto.best_dishes %}
          <a href="/fnr/search/best_dishes/{{ dish }}/">{{ dish }}</a>
        {% endfor %}
      {% else %}
        <i>We don't know what this resto is good at...</i>
      {% endif %}
    </p>
    {% if editable %}
      {% if resto.is_current_user_editor or is_admin %}
        <a href="javascript:void(0);" onclick="showEditForm('#resto_best_dishes')">[edit]</a>
      {% endif %}
    {% endif %}
  </div><!--/.form-toggle-->
  
  {% if editable %}
    {% if resto.is_current_user_editor or is_admin %}
    
      <form class="edit-form hidden" action="." method="POST">
        <input type="hidden" name="section" value="resto_best_dishes"/>
        Best dishes: <input type="text" size="40" name="best_dishes" value="{{ resto.best_dishes_str }}"/>
        <input type="button" value="Update" onclick="submitEditForm('#resto_best_dishes');"/>
        <input type="button" value="Cancel" onclick="hideEditForm('#resto_best_dishes');"/>
      </form><!--/.edit-form-->
      
      <div class="submitting hidden">
        <img src="/static/fnr/images/waiting.gif" alt="Submitting"/>
        Submitting your request... Please wait...
      </div><!--/.submitting-->
    
    {% endif %}
  {% endif %}

</div><!--/#resto_best_dishes-->

